export default {
	// 暂停和继续播放
	playAudio(state, bool) {
		state.audio.playing = bool
	},
	//保存歌单信息
	playMusicData(state, data) {
		if (data.listid !== state.playMusicListData.listid) {
			state.playMusicListData.list = data.list //当前播放歌曲列表
			state.playMusicListData.listid = data.listid // // 当前歌单listid
			state.playMusicListData.index = data.index // 当前歌单的歌曲下标值
		} else {
			state.playMusicListData.index = data.index
		}
	},
	//当前播放歌曲 歌曲信息
	playSongUrl(state, payload) {
		state.audio.playing = true
		state.playMusicListData.playSongUrl = payload
	},

	// 当前播放歌曲下标值 playIndex 赋值
	playIndex(state, index) {
		state.playMusicListData.index = index
	},
	// 当前播放歌曲下标值 playIndex +1
	increasePlayIndex(state) {
		state.playMusicListData.index++
	},
	// 当前播放歌曲下标值 playIndex -1
	decreasePlayIndex(state) {
		state.playMusicListData.index--
	},
	// 歌词
	Lyric(state, list) {
		state.playMusicListData.lyrics = list
	},
	// 音频当前播放时长
	changeCurrentTime(state, ctime) {
		state.audio.currentTime = ctime
	},
	//获取私信信息
	getMessage(state, data) {
		state.message = data
	}

}